package com.crm.ServiceImpl;

import com.crm.Service.UserService;
import com.crm.dao.UserDao;
import com.crm.daoImpl.UserDaoImpl;
import com.crm.pojo.User;

import java.util.List;

/**
 * @version : 1.0
 * @auther : hjx
 * @Date : 2021/6/26
 * @Description : 实训
 */
public class UserServiceImpl implements UserService {

    @Override
    public Boolean login(String username,String password) {
        UserDao userDao = new UserDaoImpl();
        List list = userDao.login(username,password);
        if (list.size() > 0) {
            return true;
        }
        return false;
    }

    @Override
    public List<String> queryUser() {
        UserDao userDao = new UserDaoImpl();
        List<String> list = userDao.queryAllUser();
        return list;
    }
}
